package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;

import com.example.mvp.ui.activity.BaseMvpActivity;
import com.example.myapplication.Bean.Demo;
import com.example.myapplication.Presenter.MainPresenter;
import com.example.myapplication.view.MainView;

import java.util.List;

public class MainActivity extends BaseMvpActivity<MainView, MainPresenter> implements MainView{


    @Override
    protected void initEvent() {
        mPresenter.getData();

    }

    @Override
    protected MainPresenter createPresenter() {
        return new MainPresenter();
    }

    @Override
    protected int createLayouId() {
        return R.layout.activity_main;
    }

    @Override
    public void showList(List<Demo.DatasBean> datasBeans) {
        Log.e("TAG", "showList: "+datasBeans.toString() );

    }

    @Override
    public void showError(String error, int code) {
        Log.e("TAG", "showError: "+error );

    }

    @Override
    public void showProgressbar() {

    }

    @Override
    public void hideProgressbar() {

    }
}